package com.cs.contract.controller;

import com.cs.contract.service.CsInventoryService;
import com.cs.contract.domain.CsInventory;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：zrx
 * @Package：com.cs.controller
 * @Project：RuoYi-Cloud
 * @name：CsInventoryController
 * @Date：2024/11/18 19:25
 * @Filename：CsInventoryController
 */
@RestController
@RequestMapping("/inventory")
public class CsInventoryController extends BaseController {
    private final CsInventoryService csInventoryService;

    public CsInventoryController(CsInventoryService csInventoryService) {
        this.csInventoryService = csInventoryService;
    }

    @GetMapping("/list")
    public TableDataInfo listCsInventory(CsInventory csInventory) {
        startPage();
        List<CsInventory> list = csInventoryService.listCsInventory(csInventory);
        return getDataTable(list);
    }
}
